home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / ColorSync 2.1.2 GM / Interfaces / AIncludes / CMICCProfile.a < prev    next >
Encoding:
Text File  |  1997-02-18  |  28.6 KB  |  709 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        CMICCProfile.a
  3. ;
  4. ;    Contains:    Definitions for ColorSync 2.0 profile
  5. ;
  6. ;    Version:    ColorSync 2.1
  7. ;
  8. ;    Copyright:    © 1984-1996 by Apple Computer, Inc.
  9. ;                All rights reserved.
  10. ;
  11. ;    Bugs?:        If you find a problem with this file, send the file and version
  12. ;                information (from above) and the problem description to:
  13. ;
  14. ;                    Internet:    apple.bugs@applelink.apple.com
  15. ;                    AppleLink:    APPLE.BUGS
  16. ;
  17. ;
  18.     IF &TYPE('__CMICCPROFILE__') = 'UNDEFINED' THEN
  19. __CMICCPROFILE__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24. ;  Current CMProfile.header.profileVersion Major: 2, Minor: 0, Stage: Developement (x20), Prerelease:0x01 
  25.  
  26. cmCS2ProfileVersion                EQU        $02000000
  27. ;  Current Major version number 
  28.  
  29. cmCurrentProfileMajorVersion    EQU        $02000000
  30. ;  magic cookie number for anonymous file ID 
  31.  
  32. cmMagicNumber                    EQU        'acsp'
  33. ;  ColorSync profile version 1.0 
  34.  
  35. cmCS1ProfileVersion                EQU        $00000100
  36. ; **********************************************************************
  37. ; ************** ColorSync 2.0 profile specification *******************
  38. ; **********************************************************************
  39. ; *** flags field  ***
  40.  
  41. cmICCReservedFlagsMask            EQU        $0000FFFF            ; these bits of the flags field are defined and reserved by ICC 
  42. cmEmbeddedMask                    EQU        $00000001            ; if bit 0 is 0 then not embedded profile, if 1 then embedded profile 
  43. cmEmbeddedUseMask                EQU        $00000002            ; if bit 1 is 0 then ok to use anywhere, if 1 then ok to use as embedded profile only 
  44. cmCMSReservedFlagsMask            EQU        $FFFF0000            ; these bits of the flags field are defined and reserved by CMS vendor 
  45. cmQualityMask                    EQU        $00030000            ; if bits 17-18 is 0 then normal, if 1 then draft, if 2 then best 
  46. cmInterpolationMask                EQU        $00040000            ; if bit 19 is 0 then interpolation, if 1 then lookup only 
  47. cmGamutCheckingMask                EQU        $00080000            ; if bit 20 is 0 then create gamut checking info, if 1 then no gamut checking info 
  48. ;  copyright-protection flag options 
  49.  
  50. cmEmbeddedProfile                EQU        0                    ; 0 is not embedded profile, 1 is embedded profile 
  51. cmEmbeddedUse                    EQU        1                    ; 0 is to use anywhere, 1 is to use as embedded profile only 
  52. ;  speed and quality flag options 
  53.  
  54. cmNormalMode                    EQU        0                    ; it uses the least significent two bits in the high word of flag 
  55. cmDraftMode                        EQU        1                    ; it should be evaulated like this: right shift 16 bits first, mask off the 
  56. cmBestMode                        EQU        2                    ; high 14 bits, and then compare with the enum to determine the option value 
  57. ; *** deviceAttributes fields ***
  58.  
  59. cmICCReservedAttr0Mask            EQU        $0000FFFF            ; these bits of the deviceAttributes[0] field are defined and reserved by ICC 
  60. cmReflectiveTransparentMask        EQU        $00000001            ; if bit 0 is 0 then reflective media, if 1 then transparency media 
  61. cmGlossyMatteMask                EQU        $00000002            ; if bit 1 is 0 then glossy, if 1 then matte 
  62. cmVendorReservedAttr0Mask        EQU        $FFFF0000            ; these bits of the deviceAttributes[0] field are defined and reserved by device vendor 
  63. cmVendorReservedAttr1Mask        EQU        $FFFFFFFF            ; these bits of the deviceAttributes[1] field are defined and reserved by device vendor 
  64. ;  device/media attributes element values  
  65.  
  66. cmReflective                    EQU        0                    ; if bit 0 is 0 then reflective media, if 1 then transparency media 
  67. cmGlossy                        EQU        1                    ; if bit 1 is 0 then glossy, if 1 then matte 
  68. ; *** renderingIntent field ***
  69.  
  70. cmPerceptual                    EQU        0                    ; Photographic images 
  71. cmRelativeColorimetric            EQU        1                    ; Logo Colors 
  72. cmSaturation                    EQU        2                    ; Business graphics 
  73. cmAbsoluteColorimetric            EQU        3                    ; Logo Colors 
  74. ;  data type element values 
  75.  
  76. cmAsciiData                        EQU        0
  77. cmBinaryData                    EQU        1
  78. ;  screen encodings  
  79.  
  80. cmPrtrDefaultScreens            EQU        0                    ; Use printer default screens.  0 is false, 1 is ture 
  81. cmLinesPer                        EQU        1                    ; 0 is LinesPerCm, 1 is LinesPerInch 
  82. ;  2.0 tag type information 
  83.  
  84. cmNumHeaderElements                EQU        10
  85. ;  public tags 
  86.  
  87. cmAToB0Tag                        EQU        'A2B0'
  88. cmAToB1Tag                        EQU        'A2B1'
  89. cmAToB2Tag                        EQU        'A2B2'
  90. cmBlueColorantTag                EQU        'bXYZ'
  91. cmBlueTRCTag                    EQU        'bTRC'
  92. cmBToA0Tag                        EQU        'B2A0'
  93. cmBToA1Tag                        EQU        'B2A1'
  94. cmBToA2Tag                        EQU        'B2A2'
  95. cmCalibrationDateTimeTag        EQU        'calt'
  96. cmCharTargetTag                    EQU        'targ'
  97. cmCopyrightTag                    EQU        'cprt'
  98. cmDeviceMfgDescTag                EQU        'dmnd'
  99. cmDeviceModelDescTag            EQU        'dmdd'
  100. cmGamutTag                        EQU        'gamt'
  101. cmGrayTRCTag                    EQU        'kTRC'
  102. cmGreenColorantTag                EQU        'gXYZ'
  103. cmGreenTRCTag                    EQU        'gTRC'
  104. cmLuminanceTag                    EQU        'lumi'
  105. cmMeasurementTag                EQU        'meas'
  106. cmMediaBlackPointTag            EQU        'bkpt'
  107. cmMediaWhitePointTag            EQU        'wtpt'
  108. cmNamedColorTag                    EQU        'ncol'
  109. cmNamedColor2Tag                EQU        'ncl2'
  110. cmPreview0Tag                    EQU        'pre0'
  111. cmPreview1Tag                    EQU        'pre1'
  112. cmPreview2Tag                    EQU        'pre2'
  113. cmProfileDescriptionTag            EQU        'desc'
  114. cmProfileSequenceDescTag        EQU        'pseq'
  115. cmPS2CRD0Tag                    EQU        'psd0'
  116. cmPS2CRD1Tag                    EQU        'psd1'
  117. cmPS2CRD2Tag                    EQU        'psd2'
  118. cmPS2CRD3Tag                    EQU        'psd3'
  119. cmPS2CSATag                        EQU        'ps2s'
  120. cmPS2RenderingIntentTag            EQU        'ps2i'
  121. cmRedColorantTag                EQU        'rXYZ'
  122. cmRedTRCTag                        EQU        'rTRC'
  123. cmScreeningDescTag                EQU        'scrd'
  124. cmScreeningTag                    EQU        'scrn'
  125. cmTechnologyTag                    EQU        'tech'
  126. cmUcrBgTag                        EQU        'bfd '
  127. cmViewingConditionsDescTag        EQU        'vued'
  128. cmViewingConditionsTag            EQU        'view'
  129. ;  custom tags 
  130.  
  131. cmPS2CRDVMSizeTag                EQU        'psvm'
  132. ;  technology tag descriptions 
  133.  
  134. cmTechnologyFilmScanner            EQU        'fscn'
  135. cmTechnologyReflectiveScanner    EQU        'rscn'
  136. cmTechnologyInkJetPrinter        EQU        'ijet'
  137. cmTechnologyThermalWaxPrinter    EQU        'twax'
  138. cmTechnologyElectrophotographicPrinter EQU 'epho'
  139. cmTechnologyElectrostaticPrinter EQU    'esta'
  140. cmTechnologyDyeSublimationPrinter EQU    'dsub'
  141. cmTechnologyPhotographicPaperPrinter EQU 'rpho'
  142. cmTechnologyFilmWriter            EQU        'fprn'
  143. cmTechnologyVideoMonitor        EQU        'vidm'
  144. cmTechnologyVideoCamera            EQU        'vidc'
  145. cmTechnologyProjectionTelevision EQU    'pjtv'
  146. cmTechnologyCRTDisplay            EQU        'CRT '
  147. cmTechnologyPMDisplay            EQU        'PMD '
  148. cmTechnologyAMDisplay            EQU        'AMD '
  149. cmTechnologyPhotoCD                EQU        'KPCD'
  150. cmTechnologyPhotoImageSetter    EQU        'imgs'
  151. cmTechnologyGravure                EQU        'grav'
  152. cmTechnologyOffsetLithography    EQU        'offs'
  153. cmTechnologySilkscreen            EQU        'silk'
  154. cmTechnologyFlexography            EQU        'flex'
  155. ;  type signatures 
  156.  
  157. cmSigCurveType                    EQU        'curv'
  158. cmSigDataType                    EQU        'data'
  159. cmSigDateTimeType                EQU        'dtim'
  160. cmSigLut16Type                    EQU        'mft2'
  161. cmSigLut8Type                    EQU        'mft1'
  162. cmSigMeasurementType            EQU        'meas'
  163. cmSigNamedColorType                EQU        'ncol'
  164. cmSigNamedColor2Type            EQU        'ncl2'
  165. cmSigProfileDescriptionType        EQU        'desc'
  166. cmSigScreeningType                EQU        'scrn'
  167. cmSigS15Fixed16Type                EQU        'sf32'
  168. cmSigSignatureType                EQU        'sig '
  169. cmSigTextType                    EQU        'text'
  170. cmSigU16Fixed16Type                EQU        'uf32'
  171. cmSigU1Fixed15Type                EQU        'uf16'
  172. cmSigUInt32Type                    EQU        'ui32'
  173. cmSigUInt64Type                    EQU        'ui64'
  174. cmSigUInt8Type                    EQU        'ui08'
  175. cmSigViewingConditionsType        EQU        'view'
  176. cmSigXYZType                    EQU        'XYZ '
  177. ;  Measurement type encodings 
  178. ;  Measurement Flare 
  179.  
  180. cmFlare0                        EQU        $00000000
  181. cmFlare100                        EQU        $00000001
  182. ;  Measurement Geometry    
  183.  
  184. cmGeometryUnknown                EQU        $00000000
  185. cmGeometry045or450                EQU        $00000001
  186. cmGeometry0dord0                EQU        $00000002
  187. ;  Standard Observer    
  188.  
  189. cmStdobsUnknown                    EQU        $00000000
  190. cmStdobs1931TwoDegrees            EQU        $00000001
  191. cmStdobs1964TenDegrees            EQU        $00000002
  192. ;  Standard Illuminant 
  193.  
  194. cmIlluminantUnknown                EQU        $00000000
  195. cmIlluminantD50                    EQU        $00000001
  196. cmIlluminantD65                    EQU        $00000002
  197. cmIlluminantD93                    EQU        $00000003
  198. cmIlluminantF2                    EQU        $00000004
  199. cmIlluminantD55                    EQU        $00000005
  200. cmIlluminantA                    EQU        $00000006
  201. cmIlluminantEquiPower            EQU        $00000007
  202. cmIlluminantF8                    EQU        $00000008
  203. ;  Spot Function Value 
  204.  
  205. cmSpotFunctionUnknown            EQU        0
  206. cmSpotFunctionDefault            EQU        1
  207. cmSpotFunctionRound                EQU        2
  208. cmSpotFunctionDiamond            EQU        3
  209. cmSpotFunctionEllipse            EQU        4
  210. cmSpotFunctionLine                EQU        5
  211. cmSpotFunctionSquare            EQU        6
  212. cmSpotFunctionCross                EQU        7
  213. ;  Color Space Signatures 
  214.  
  215. cmXYZData                        EQU        'XYZ '
  216. cmLabData                        EQU        'Lab '
  217. cmLuvData                        EQU        'Luv '
  218. cmYxyData                        EQU        'Yxy '
  219. cmRGBData                        EQU        'RGB '
  220. cmGrayData                        EQU        'GRAY'
  221. cmHSVData                        EQU        'HSV '
  222. cmHLSData                        EQU        'HLS '
  223. cmCMYKData                        EQU        'CMYK'
  224. cmCMYData                        EQU        'CMY '
  225. cmMCH5Data                        EQU        'MCH5'
  226. cmMCH6Data                        EQU        'MCH6'
  227. cmMCH7Data                        EQU        'MCH7'
  228. cmMCH8Data                        EQU        'MCH8'
  229. ;  profileClass enumerations 
  230.  
  231. cmInputClass                    EQU        'scnr'
  232. cmDisplayClass                    EQU        'mntr'
  233. cmOutputClass                    EQU        'prtr'
  234. cmLinkClass                        EQU        'link'
  235. cmAbstractClass                    EQU        'abst'
  236. cmColorSpaceClass                EQU        'spac'
  237. cmNamedColorClass                EQU        'nmcl'
  238. ;  platform enumerations 
  239.  
  240. cmMacintosh                        EQU        'APPL'
  241. cmMicrosoft                        EQU        'MSFT'
  242. cmSolaris                        EQU        'SUNW'
  243. cmSiliconGraphics                EQU        'SGI '
  244. cmTaligent                        EQU        'TGNT'
  245. ;  ColorSync 1.0 elements 
  246.  
  247. cmCS1ChromTag                    EQU        'chrm'
  248. cmCS1TRCTag                        EQU        'trc '
  249. cmCS1NameTag                    EQU        'name'
  250. cmCS1CustTag                    EQU        'cust'
  251. ;  General element data types 
  252. CMDateTime                RECORD 0
  253. year                     ds.w    1                ; offset: $0 (0)
  254. month                     ds.w    1                ; offset: $2 (2)
  255. dayOfTheMonth             ds.w    1                ; offset: $4 (4)
  256. hours                     ds.w    1                ; offset: $6 (6)
  257. minutes                     ds.w    1                ; offset: $8 (8)
  258. seconds                     ds.w    1                ; offset: $A (10)
  259. sizeof                     EQU *                    ; size:   $C (12)
  260.                         ENDR
  261. CMFixedXYZColor            RECORD 0
  262. X                         ds.l    1                ; offset: $0 (0)
  263. Y                         ds.l    1                ; offset: $4 (4)
  264. Z                         ds.l    1                ; offset: $8 (8)
  265. sizeof                     EQU *                    ; size:   $C (12)
  266.                         ENDR
  267. ; typedef unsigned short                 CMXYZComponent
  268.  
  269. CMXYZColor                RECORD 0
  270. X                         ds.w    1                ; offset: $0 (0)
  271. Y                         ds.w    1                ; offset: $2 (2)
  272. Z                         ds.w    1                ; offset: $4 (4)
  273. sizeof                     EQU *                    ; size:   $6 (6)
  274.                         ENDR
  275. CM2Header                RECORD 0
  276. size                     ds.l    1                ; offset: $0 (0)        ;  This is the total size of the Profile 
  277. CMMType                     ds.l    1                ; offset: $4 (4)        ;  CMM signature,  Registered with CS2 consortium  
  278. profileVersion             ds.l    1                ; offset: $8 (8)        ;  Version of CMProfile format 
  279. profileClass             ds.l    1                ; offset: $C (12)        ;  input, display, output, devicelink, abstract, or color conversion profile type 
  280. dataColorSpace             ds.l    1                ; offset: $10 (16)        ;  color space of data 
  281. profileConnectionSpace     ds.l    1                ; offset: $14 (20)        ;  profile connection color space 
  282. dateTime                 ds        CMDateTime        ; offset: $18 (24)        ;  date and time of profile creation 
  283. CS2profileSignature         ds.l    1                ; offset: $24 (36)        ;  'acsp' constant ColorSync 2.0 file ID 
  284. platform                 ds.l    1                ; offset: $28 (40)        ;  primary profile platform, Registered with CS2 consortium 
  285. flags                     ds.l    1                ; offset: $2C (44)        ;  profile flags 
  286. deviceManufacturer         ds.l    1                ; offset: $30 (48)        ;  Registered with ICC consortium 
  287. deviceModel                 ds.l    1                ; offset: $34 (52)        ;  Registered with ICC consortium 
  288. deviceAttributes         ds.l    2                ; offset: $38 (56)        ;  Attributes like paper type 
  289. renderingIntent             ds.l    1                ; offset: $40 (64)        ;  preferred rendering intent of tagged object 
  290. white                     ds        CMFixedXYZColor ; offset: $44 (68)        ;  profile illuminant 
  291. creator                     ds.l    1                ; offset: $50 (80)        ;  profile creator 
  292. reserved                 ds.b    44                ; offset: $54 (84)        ;  reserved for future use 
  293. sizeof                     EQU *                    ; size:   $80 (128)
  294.                         ENDR
  295. CMTagRecord                RECORD 0
  296. tag                         ds.l    1                ; offset: $0 (0)        ;  Registered with CS2 consortium 
  297. elementOffset             ds.l    1                ; offset: $4 (4)        ;  Relative to start of CMProfile 
  298. elementSize                 ds.l    1                ; offset: $8 (8)
  299. sizeof                     EQU *                    ; size:   $C (12)
  300.                         ENDR
  301. CMTagElemTable            RECORD 0
  302. count                     ds.l    1                ; offset: $0 (0)
  303. tagList                     ds        CMTagRecord        ; offset: $4 (4) <-- really an array of length one ;  Variable size 
  304. sizeof                     EQU *                    ; size:   $10 (16)
  305.                         ENDR
  306. ;  External 0x02002001 CMProfile 
  307. CM2Profile                RECORD 0
  308. header                     ds        CM2Header        ; offset: $0 (0)
  309. tagTable                 ds        CMTagElemTable ; offset: $80 (128)
  310. elemData                 ds.b    1                ; offset: $90 (144) <-- really an array of length one ;  Tagged element storage. Variable size 
  311.                          ORG 146
  312. sizeof                     EQU *                    ; size:   $92 (146)
  313.                         ENDR
  314. ; typedef struct CM2Profile *            CM2ProfilePtr
  315.  
  316. ; typedef CM2ProfilePtr *                CM2ProfileHandle
  317.  
  318. ;  Tag Type Definitions 
  319. CMCurveType                RECORD 0
  320. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'curv' 
  321. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  322. countValue                 ds.l    1                ; offset: $8 (8)        ;  number of entries in table that follows 
  323. data                     ds.w    1                ; offset: $C (12) <-- really an array of length one ;  Tagged element storage. Variable size 
  324. sizeof                     EQU *                    ; size:   $E (14)
  325.                         ENDR
  326. CMDataType                RECORD 0
  327. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'data' 
  328. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  329. dataFlag                 ds.l    1                ; offset: $8 (8)        ;  0 = ASCII, 1 = binary 
  330. data                     ds.b    1                ; offset: $C (12) <-- really an array of length one ;  Tagged element storage. Variable size 
  331.                          ORG 14
  332. sizeof                     EQU *                    ; size:   $E (14)
  333.                         ENDR
  334. CMDateTimeType            RECORD 0
  335. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'dtim' 
  336. reserved                 ds.l    1                ; offset: $4 (4)
  337. dateTime                 ds        CMDateTime        ; offset: $8 (8)
  338. sizeof                     EQU *                    ; size:   $14 (20)
  339.                         ENDR
  340. CMLut16Type                RECORD 0
  341. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'mft2' 
  342. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  343. inputChannels             ds.b    1                ; offset: $8 (8)        ;  Number of input channels 
  344. outputChannels             ds.b    1                ; offset: $9 (9)        ;  Number of output channels 
  345. gridPoints                 ds.b    1                ; offset: $A (10)        ;  Number of clutTable grid points 
  346. reserved2                 ds.b    1                ; offset: $B (11)        ;  fill with 0x00 
  347. matrix                     ds.l    3 * 3            ; offset: $C (12)        ;  
  348. inputTableEntries         ds.w    1                ; offset: $30 (48)        ;  
  349. outputTableEntries         ds.w    1                ; offset: $32 (50)        ;  
  350. inputTable                 ds.w    1                ; offset: $34 (52) <-- really an array of length one ;  Variable size 
  351. CLUT                     ds.w    1                ; offset: $36 (54) <-- really an array of length one ;  Variable size 
  352. outputTable                 ds.w    1                ; offset: $38 (56) <-- really an array of length one ;  Variable size 
  353. sizeof                     EQU *                    ; size:   $3A (58)
  354.                         ENDR
  355. CMLut8Type                RECORD 0
  356. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'mft1' 
  357. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  358. inputChannels             ds.b    1                ; offset: $8 (8)        ;  
  359. outputChannels             ds.b    1                ; offset: $9 (9)        ;  
  360. gridPoints                 ds.b    1                ; offset: $A (10)        ;  
  361. reserved2                 ds.b    1                ; offset: $B (11)        ;  fill with 0x00 
  362. matrix                     ds.l    3 * 3            ; offset: $C (12)        ;  
  363. inputTable                 ds.b    256                ; offset: $30 (48)        ;  fixed size of 256 
  364. CLUT                     ds.b    2                ; offset: $130 (304)    ;  Variable size 
  365. outputTable                 ds.b    256                ; offset: $132 (306)    ;  fixed size of 256 
  366. sizeof                     EQU *                    ; size:   $232 (562)
  367.                         ENDR
  368. CMMeasurementType        RECORD 0
  369. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'meas' 
  370. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  371. standardObserver         ds.l    1                ; offset: $8 (8)        ;  0 : unknown, 1 : CIE 1931, 2 : CIE 1964 
  372. backingXYZ                 ds        CMFixedXYZColor ; offset: $C (12)        ;  absolute XYZ values of backing 
  373. geometry                 ds.l    1                ; offset: $18 (24)        ;  0 : unknown, 1 : 0/45 or 45/0, 2 :0/d or d/0 
  374. flare                     ds.l    1                ; offset: $1C (28)        ;  0 : 0%, 1 : 100% flare 
  375. illuminant                 ds.l    1                ; offset: $20 (32)        ;  standard illuminant 
  376. sizeof                     EQU *                    ; size:   $24 (36)
  377.                         ENDR
  378. CMNamedColorType        RECORD 0
  379. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ncol' 
  380. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  381. vendorFlag                 ds.l    1                ; offset: $8 (8)        ;  
  382. count                     ds.l    1                ; offset: $C (12)        ;  count of named colors in array that follows 
  383. prefixName                 ds.b    1                ; offset: $10 (16) <-- really an array of length one ;  Variable size, max = 32, to access fields after this one, have to count bytes 
  384. suffixName                 ds.b    1                ; offset: $11 (17) <-- really an array of length one ;  Variable size, max = 32 
  385. data                     ds.b    1                ; offset: $12 (18) <-- really an array of length one ;  varaible size data as explained below 
  386.                          ORG 20
  387. sizeof                     EQU *                    ; size:   $14 (20)
  388.                         ENDR
  389. ;
  390. ;    A variable size array of structs appears as the last block of data
  391. ;    in the above struct, CMNamedColorType.  The data structure
  392. ;    is as follows: (example in C)
  393. ;    
  394. ;     struct {                                             
  395. ;            unsigned char    rootName[1];                 * Variable size, max = 32 
  396. ;            unsigned char    colorCoords[1];                 * Variable size  
  397. ;     } colorName[1];                                     * Variable size  
  398. ;
  399. CMNamedColor2Type        RECORD 0
  400. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ncl2' 
  401. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  402. vendorFlag                 ds.l    1                ; offset: $8 (8)        ;  lower 16 bits reserved for ICC use 
  403. count                     ds.l    1                ; offset: $C (12)        ;  count of named colors in array that follows 
  404. deviceChannelCount         ds.l    1                ; offset: $10 (16)        ;  number of device channels, 0 indicates no device value available 
  405. prefixName                 ds.b    32                ; offset: $14 (20)        ;  32 byte field.  7 bit ASCII null terminated 
  406. suffixName                 ds.b    32                ; offset: $34 (52)        ;  32 byte field.  7 bit ASCII null terminated 
  407. data                     ds.b    1                ; offset: $54 (84) <-- really an array of length one ;  varaible size data as explained below 
  408.                          ORG 86
  409. sizeof                     EQU *                    ; size:   $56 (86)
  410.                         ENDR
  411. ;
  412. ;    A variable size array of structs appears as the last block of data
  413. ;    in the above struct, CMNamedColor2Type.  The data structure
  414. ;    is as follows: (example in C)
  415. ;    
  416. ;     struct {                                             
  417. ;            unsigned char    rootName[1];                 * 32 byte field.  7 bit ASCII null terminated
  418. ;            unsigned char    PCSColorCoords[1];             * Variable size  
  419. ;            unsigned char    DeviceColorCoords[1];         * Variable size  
  420. ;     } colorName2[1];                                     * Variable size  
  421. ;
  422. CMTextDescriptionType    RECORD 0
  423. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'desc' 
  424. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  425. ASCIICount                 ds.l    1                ; offset: $8 (8)        ;  the count of "bytes" 
  426. ASCIIName                 ds.b    2                ; offset: $C (12)        ;  Variable size, to access fields after this one, have to count bytes 
  427. UniCodeCode                 ds.l    1                ; offset: $E (14)
  428. UniCodeCount             ds.l    1                ; offset: $12 (18)        ;  the count of characters, each character has two bytes 
  429. UniCodeName                 ds.b    2                ; offset: $16 (22)        ;  Variable size 
  430. ScriptCodeCode             ds.w    1                ; offset: $18 (24)
  431. ScriptCodeCount             ds.b    1                ; offset: $1A (26)        ;  the count of "bytes" 
  432.                          ORG 28
  433. ScriptCodeName             ds.b    2                ; offset: $1C (28)        ;  Variable size 
  434. sizeof                     EQU *                    ; size:   $1E (30)
  435.                         ENDR
  436. CMTextType                RECORD 0
  437. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'text' 
  438. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  439. text                     ds.b    1                ; offset: $8 (8) <-- really an array of length one ;  count of text is obtained from tag size element 
  440.                          ORG 10
  441. sizeof                     EQU *                    ; size:   $A (10)
  442.                         ENDR
  443. CMScreeningType            RECORD 0
  444. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'scrn' 
  445. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  446. screeningFlag             ds.l    1                ; offset: $8 (8)        ;  bit 0 : use printer default screens, bit 1 : inch/cm 
  447. channelCount             ds.l    1                ; offset: $C (12)
  448. data                     ds.b    1                ; offset: $10 (16) <-- really an array of length one ;  varaible size data as explained below 
  449.                          ORG 18
  450. sizeof                     EQU *                    ; size:   $12 (18)
  451.                         ENDR
  452. ;
  453. ;    A variable size array of structs appears as the last block of data
  454. ;    in the above struct, CMScreeningType.  The data structure
  455. ;    is as follows: (example in C)
  456. ;    
  457. ;    struct {
  458. ;        Fixed            frequency;
  459. ;        Fixed            angle;
  460. ;        unsigned long    sportFunction;
  461. ;     }    channelScreening[1];                             * Variable size 
  462. ;
  463. CMSignatureType            RECORD 0
  464. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'sig ' 
  465. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  466. signature                 ds.l    1                ; offset: $8 (8)
  467. sizeof                     EQU *                    ; size:   $C (12)
  468.                         ENDR
  469. CMS15Fixed16ArrayType    RECORD 0
  470. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'sf32' 
  471. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  472. value                     ds.l    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size 
  473. sizeof                     EQU *                    ; size:   $C (12)
  474.                         ENDR
  475. CMU16Fixed16ArrayType    RECORD 0
  476. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'uf32' 
  477. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  478. value                     ds.l    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size 
  479. sizeof                     EQU *                    ; size:   $C (12)
  480.                         ENDR
  481. CMUInt16ArrayType        RECORD 0
  482. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ui16' 
  483. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  484. value                     ds.w    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size 
  485. sizeof                     EQU *                    ; size:   $A (10)
  486.                         ENDR
  487. CMUInt32ArrayType        RECORD 0
  488. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ui32' 
  489. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  490. value                     ds.l    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size 
  491. sizeof                     EQU *                    ; size:   $C (12)
  492.                         ENDR
  493. CMUInt64ArrayType        RECORD 0
  494. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ui64' 
  495. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  496. value                     ds.l    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size (x2) 
  497. sizeof                     EQU *                    ; size:   $C (12)
  498.                         ENDR
  499. CMUInt8ArrayType        RECORD 0
  500. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ui08' 
  501. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  502. value                     ds.b    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size 
  503.                          ORG 10
  504. sizeof                     EQU *                    ; size:   $A (10)
  505.                         ENDR
  506. CMViewingConditionsType    RECORD 0
  507. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'view' 
  508. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  509. illuminant                 ds        CMFixedXYZColor ; offset: $8 (8)        ;  absolute XYZs of illuminant  in cd/m^2 
  510. surround                 ds        CMFixedXYZColor ; offset: $14 (20)        ;  absolute XYZs of surround in cd/m^2 
  511. stdIlluminant             ds.l    1                ; offset: $20 (32)        ;  see definitions of std illuminants 
  512. sizeof                     EQU *                    ; size:   $24 (36)
  513.                         ENDR
  514. CMXYZType                RECORD 0
  515. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'XYZ ' 
  516. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  517. XYZ                         ds        CMFixedXYZColor ; offset: $8 (8) <-- really an array of length one ;  variable size XYZ tristimulus values 
  518. sizeof                     EQU *                    ; size:   $14 (20)
  519.                         ENDR
  520. ;  Profile sequence description type 
  521. CMProfileSequenceDescType RECORD 0
  522. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'pseq ' 
  523. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  524. count                     ds.l    1                ; offset: $8 (8)        ;  Number of descriptions 
  525. data                     ds.b    1                ; offset: $C (12) <-- really an array of length one ;  varaible size data as explained below 
  526.                          ORG 14
  527. sizeof                     EQU *                    ; size:   $E (14)
  528.                         ENDR
  529. ;
  530. ;    A variable size array of structs appears as the last block of data
  531. ;    in the above struct, CMProfileSequenceDescType.  The data structure
  532. ;    is as follows: (example in C)
  533. ;    
  534. ;     struct {                                             
  535. ;            OSType            deviceMfg;                     * Device Manufacturer 
  536. ;            OSType            deviceModel;                 * Decvice Model 
  537. ;            unsigned long    attributes[2];                 * Device attributes 
  538. ;            OSType            technology;                     * Technology signature 
  539. ;            unsigned long    mfgDescASCIICount;             * the count of "bytes" 
  540. ;            unsigned char    mfgDescASCIIName[2];         * Variable size 
  541. ;            unsigned long    mfgDescUniCodeCode;             
  542. ;            unsigned long    mfgDescUniCodeCount;         * the count of characters, each character has two bytes 
  543. ;            unsigned char    mfgDescUniCodeName[2];         * Variable size 
  544. ;            unsigned long    mfgDescScriptCodeCode;         
  545. ;            unsigned long    mfgDescScriptCodeCount;         * the count of "bytes" 
  546. ;            unsigned char    mfgDescScriptCodeName[2];     * Variable size 
  547. ;            unsigned long    modelDescASCIICount;         * the count of "bytes" 
  548. ;            unsigned char    modelDescASCIIName[2];         * Variable size 
  549. ;            unsigned long    modelDescUniCodeCode;         
  550. ;            unsigned long    modelDescUniCodeCount;         * the count of characters, each character has two bytes 
  551. ;            unsigned char    modelDescUniCodeName[2];     * Variable size 
  552. ;            short            modelDescScriptCodeCode;     
  553. ;            unsigned char    modelDescScriptCodeCount;     * the count of "bytes" 
  554. ;            SInt8            filler;                         * For proper alignment across languages 
  555. ;            unsigned char    modelDescScriptCodeName[2];     * Variable size 
  556. ;     }    profileDescription[1];                         
  557. ;
  558. ;  Under color removal, black generation type 
  559. CMUcrBgType                RECORD 0
  560. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'bfd  ' 
  561. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  562. ucrCount                 ds.l    1                ; offset: $8 (8)        ;  Number of UCR entries 
  563. ucrValues                 ds.w    1                ; offset: $C (12) <-- really an array of length one ;  variable size 
  564. bgCount                     ds.l    1                ; offset: $E (14)        ;  Number of BG entries 
  565. bgValues                 ds.w    1                ; offset: $12 (18) <-- really an array of length one ;  variable size 
  566. ucrbgASCII                 ds.b    1                ; offset: $14 (20) <-- really an array of length one ;  null terminated ASCII string 
  567.                          ORG 22
  568. sizeof                     EQU *                    ; size:   $16 (22)
  569.                         ENDR
  570. CMIntentCRDVMSize        RECORD 0
  571. renderingIntent             ds.l    1                ; offset: $0 (0)        ;  rendering intent 
  572. VMSize                     ds.l    1                ; offset: $4 (4)        ;  VM size taken up by the CRD 
  573. sizeof                     EQU *                    ; size:   $8 (8)
  574.                         ENDR
  575. CMPS2CRDVMSizeType        RECORD 0
  576. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'psvm' 
  577. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  578. count                     ds.l    1                ; offset: $8 (8)        ;  number of intent entries 
  579. intentCRD                 ds        CMIntentCRDVMSize ; offset: $C (12) <-- really an array of length one ;  variable size 
  580. sizeof                     EQU *                    ; size:   $14 (20)
  581.                         ENDR
  582. ; **********************************************************************
  583. ; ************** ColorSync 1.0 profile specification *******************
  584. ; **********************************************************************
  585.  
  586. cmGrayResponse                    EQU        0
  587. cmRedResponse                    EQU        1
  588. cmGreenResponse                    EQU        2
  589. cmBlueResponse                    EQU        3
  590. cmCyanResponse                    EQU        4
  591. cmMagentaResponse                EQU        5
  592. cmYellowResponse                EQU        6
  593. cmUcrResponse                    EQU        7
  594. cmBgResponse                    EQU        8
  595. cmOnePlusLastResponse            EQU        9
  596. ;  Device types 
  597.  
  598. cmMonitorDevice                    EQU        'mntr'
  599. cmScannerDevice                    EQU        'scnr'
  600. cmPrinterDevice                    EQU        'prtr'
  601. CMIString                RECORD 0
  602. theScript                 ds.w    1                ; offset: $0 (0)
  603. theString                 ds        Str63            ; offset: $2 (2)
  604. sizeof                     EQU *                    ; size:   $42 (66)
  605.                         ENDR
  606. ;  Profile options 
  607.  
  608. cmPerceptualMatch                EQU        $0000                ; Default. For photographic images 
  609. cmColorimetricMatch                EQU        $0001                ; Exact matching when possible 
  610. cmSaturationMatch                EQU        $0002                ; For solid colors 
  611. ;  Profile flags 
  612.  
  613. cmNativeMatchingPreferred        EQU        $00000001            ; Default to native not preferred 
  614. cmTurnOffCache                    EQU        $00000002            ; Default to turn on CMM cache 
  615. ; typedef long                             CMMatchOption
  616.  
  617. ; typedef long                             CMMatchFlag
  618.  
  619. CMHeader                RECORD 0
  620. size                     ds.l    1                ; offset: $0 (0)
  621. CMMType                     ds.l    1                ; offset: $4 (4)
  622. applProfileVersion         ds.l    1                ; offset: $8 (8)
  623. dataType                 ds.l    1                ; offset: $C (12)
  624. deviceType                 ds.l    1                ; offset: $10 (16)
  625. deviceManufacturer         ds.l    1                ; offset: $14 (20)
  626. deviceModel                 ds.l    1                ; offset: $18 (24)
  627. deviceAttributes         ds.l    2                ; offset: $1C (28)
  628. profileNameOffset         ds.l    1                ; offset: $24 (36)
  629. customDataOffset         ds.l    1                ; offset: $28 (40)
  630. flags                     ds.l    1                ; offset: $2C (44)
  631. options                     ds.l    1                ; offset: $30 (48)
  632. white                     ds        CMXYZColor        ; offset: $34 (52)
  633. black                     ds        CMXYZColor        ; offset: $3A (58)
  634. sizeof                     EQU *                    ; size:   $40 (64)
  635.                         ENDR
  636. CMProfileChromaticities    RECORD 0
  637. red                         ds        CMXYZColor        ; offset: $0 (0)
  638. green                     ds        CMXYZColor        ; offset: $6 (6)
  639. blue                     ds        CMXYZColor        ; offset: $C (12)
  640. cyan                     ds        CMXYZColor        ; offset: $12 (18)
  641. magenta                     ds        CMXYZColor        ; offset: $18 (24)
  642. yellow                     ds        CMXYZColor        ; offset: $1E (30)
  643. sizeof                     EQU *                    ; size:   $24 (36)
  644.                         ENDR
  645. CMProfileResponse        RECORD 0
  646. counts                     ds.w    9                ; offset: $0 (0)
  647. data                     ds.w    1                ; offset: $12 (18) <-- really an array of length one ;  Variable size 
  648. sizeof                     EQU *                    ; size:   $14 (20)
  649.                         ENDR
  650. CMProfile                RECORD 0
  651. header                     ds        CMHeader        ; offset: $0 (0)
  652. profile                     ds        CMProfileChromaticities ; offset: $40 (64)
  653. response                 ds        CMProfileResponse ; offset: $64 (100)
  654. profileName                 ds        CMIString        ; offset: $78 (120)
  655. customData                 ds.b    1                ; offset: $BA (186) <-- really an array of length one ;  Variable size 
  656.                          ORG 188
  657. sizeof                     EQU *                    ; size:   $BC (188)
  658.                         ENDR
  659. ; typedef struct CMProfile *            CMProfilePtr
  660.  
  661. ; typedef CMProfilePtr *                CMProfileHandle
  662.  
  663.     IF OLDROUTINENAMES THEN
  664.  
  665. kCMApplProfileVersion            EQU        $00000100
  666.  
  667. grayResponse                    EQU        0
  668. redResponse                        EQU        1
  669. greenResponse                    EQU        2
  670. blueResponse                    EQU        3
  671. cyanResponse                    EQU        4
  672. magentaResponse                    EQU        5
  673. yellowResponse                    EQU        6
  674. ucrResponse                        EQU        7
  675. bgResponse                        EQU        8
  676. onePlusLastResponse                EQU        9
  677.  
  678. rgbData                            EQU        'RGB '
  679. cmykData                        EQU        'CMYK'
  680. grayData                        EQU        'GRAY'
  681. xyzData                            EQU        'XYZ '
  682.  
  683. monitorDevice                    EQU        'mntr'
  684. scannerDevice                    EQU        'scnr'
  685. printerDevice                    EQU        'prtr'
  686. ; typedef unsigned short                 XYZComponent
  687.  
  688. XYZColor                RECORD 0
  689. f                         ds        CMXYZColor
  690. sizeof                     EQU *                    ; size:   $6 (6)
  691.                         ENDR
  692.  
  693.  
  694. ; typedef unsigned short                 CMResponseData
  695.  
  696. IString                    RECORD 0
  697. f                         ds        CMIString
  698. sizeof                     EQU *                    ; size:   $42 (66)
  699.                         ENDR
  700.  
  701.  
  702. ; typedef long                             CMResponseColor
  703.  
  704. ; typedef CMResponseColor                 responseColor
  705.  
  706.     ENDIF
  707.     ENDIF ; __CMICCPROFILE__ 
  708.  
  709.